package com.tl.commonlibrary.event;

import org.greenrobot.eventbus.EventBus;

/**
 * Created by Administrator on 2017/7/13 0013.
 */

public class EventUtil {
    public static void register(Object object) {
        if (!EventBus.getDefault().isRegistered(object)) {
            EventBus.getDefault().register(object);
        }
    }

    public static void unRegister(Object object) {
        if (EventBus.getDefault().isRegistered(object)) {
            EventBus.getDefault().unregister(object);
        }
    }

    public static void post(Object object) {
        EventBus.getDefault().post(object);
    }
}
